﻿package com.hatch.utils {	import com.hatch.utils.StringUtils;	import flash.external.ExternalInterface;	/**	 * @author ahatch	 */	public class NetUtil 	{			public static function get parentDomain():String		{			try			{				var domain:String = StringUtils.remove(parentUrl, 'http://', false);				return StringUtils.beforeFirst(domain, '/');			}			catch(error:Error){}			catch (error:SecurityError){}			return '';		}				public static function get parentUrl():String		{				if(ExternalInterface.available)			{				try				{					var parent:String = String( ExternalInterface.call(" function(){ return document.location.href.toString();}"));					return parent;				}				catch(error:Error){}				catch (error:SecurityError){}			}			return '';		}			}}